#!/usr/bin/env python
#coding:utf-8

import sqlite3
conn = sqlite3.connect("adr.db")
curs = conn.cursor()

name = raw_input("Name:")
email = raw_input("Email:")

query = "insert into address(name, email) values ('%s', '%s')" % (name, email)

curs.execute(query)
conn.commit()

rec = curs.execute("select * from address")

for i in rec.fetchall():
    for a in i:
        print a,
    print "\n"
    
conn.close()
